const express =require('express');
const router = express.Router();
const articleController=require('../controller/articleController')
const UserController=require('../controller/UserController')
const multer=require('multer')

var upload = multer({ dest: 'static/uploads/' }) 

router.get('/login',UserController.login);
router.post('/logon',UserController.logon);
router.get('/logout',UserController.logout);
router.get('/',articleController.index);
router.get('/index2',articleController.index2);
router.get('/articleCount',articleController.articleCount);
router.get('/recyclework',articleController.recyclework);
router.post('/addart',upload.single('fo_file'),articleController.add);
router.get('/inquiry',articleController.inquiry);
router.get('/classify',articleController.classify);
router.get('/register',UserController.register);
router.get('/cateArticleCount',articleController.cateArticleCount);
router.post('/registerOn',upload.single('fo_file'),UserController.registerOn);
router.get('/dele',articleController.dele);
router.get('/recycle',articleController.recycle);
router.get('/Reback',articleController.Reback);
router.post('/update',upload.single('fo_file'),articleController.update);
router.post('/getCate',articleController.getCate);
router.post('/deleteCate',articleController.deleteCate);
router.post('/uppassword',UserController.uppassword);
router.post('/updataurl',upload.single('changeurl'),UserController.updateurl);
router.post("/confir",UserController.confir);
router.post("/addClassify",articleController.addClassify);
router.post("/updataClassify",articleController.updataClassify);
router.post("/getContent",articleController.getContent);

module.exports=router;